package org.summer.lawyer.constant.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 *
 */
@Getter
@AllArgsConstructor
public enum WalletActionEnums {

    /**
     * 收入操作
     */
    INCOME("收入", "收入"),

    /**
     * 提现操作
     */
    WITHDRAW("提现", "提现");


    public static WalletActionEnums getByCode(String code) {
        return ArrayUtil.firstMatch(item -> Objects.equals(item.getCode(), code), values());
    }

    private final  String code;

    private final String info;
}
